package com.example.jiancaiwang.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.jiancaiwang.R;
import com.example.jiancaiwang.entity.MenuEntity;
import com.example.jiancaiwang.utils.GlideUtils;

import java.util.List;

import androidx.annotation.Nullable;

public class HomeMenuAdapter extends BaseQuickAdapter<MenuEntity, BaseViewHolder> {
    public HomeMenuAdapter(int layoutResId, @Nullable List<MenuEntity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MenuEntity item) {
        GlideUtils.displayCircleImage(mContext, item.getThumb(), (ImageView) helper.getView(R.id.iv));
        helper.setText(R.id.tv, item.getName() + "");
    }
}